<template>
  <el-breadcrumb separator="/" class="b">
  <!-- <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item> -->
  <el-breadcrumb-item v-for="item in navs" :key="item.path" :to="{ path: item.path }">{{ item.meta.title }}</el-breadcrumb-item>
</el-breadcrumb>
</template>

<script>
export default {
  computed:{
    navs(){
      console.log('路由信息',this.$route.matched);
      let routes = this.$route.matched;
      return routes;
    }
  },
  created(){
    console.log('路由信息',this.$route.matched);//当前路由信息和父级路由
  }
}
</script>

<style lang="less" scoped>
.b{
    margin-bottom: 10px;
}
</style>